<?php

namespace Budget\BudgetBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * @ORM\Entity(repositoryClass="Budget\BudgetBundle\Repository\FamilyMonthRepository")
 * @ORM\Table(name="family_month")
 */
class FamilyMonth
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;
    
    /**
     * @ORM\Column(type="integer")
     */
    protected $year;
    
    /**
     * @ORM\Column(type="integer")
     */
    protected $month;
    
    /**
     * @ORM\Column(type="date")
     */
    protected $start;
    
    /**
     * @ORM\Column(type="date") 
     */
    protected $end;
    
    /**
     * @ORM\Column(type="datetime")
     */
    protected $date_created;
    
    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    protected $date_deleted;
    /**
     *
     * @ORM\ManyToOne(targetEntity="Family", inversedBy="months")
     * @ORM\JoinColumn(name="family_id", referencedColumnName="id")
     */
    protected $family;
    
    /**
     *
     * @ORM\Column(type="decimal", precision=10, scale=2)
     */
    protected $amount_left;

    public function __construct()
    {
        
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set year
     *
     * @param integer $year
     * @return FamilyMonth
     */
    public function setYear($year)
    {
        $this->year = $year;

        return $this;
    }

    /**
     * Get year
     *
     * @return integer 
     */
    public function getYear()
    {
        return $this->year;
    }

    /**
     * Set month
     *
     * @param integer $month
     * @return FamilyMonth
     */
    public function setMonth($month)
    {
        $this->month = $month;

        return $this;
    }

    /**
     * Get month
     *
     * @return integer 
     */
    public function getMonth()
    {
        return $this->month;
    }

    /**
     * Set start
     *
     * @param \DateTime $start
     * @return FamilyMonth
     */
    public function setStart($start)
    {
        $this->start = $start;

        return $this;
    }

    /**
     * Get start
     *
     * @return \DateTime 
     */
    public function getStart()
    {
        return $this->start;
    }

    /**
     * Set end
     *
     * @param \DateTime $end
     * @return FamilyMonth
     */
    public function setEnd($end)
    {
        $this->end = $end;

        return $this;
    }

    /**
     * Get end
     *
     * @return \DateTime 
     */
    public function getEnd()
    {
        return $this->end;
    }

    /**
     * Set date_created
     *
     * @param \DateTime $dateCreated
     * @return FamilyMonth
     */
    public function setDateCreated($dateCreated)
    {
        $this->date_created = $dateCreated;

        return $this;
    }

    /**
     * Get date_created
     *
     * @return \DateTime 
     */
    public function getDateCreated()
    {
        return $this->date_created;
    }

    /**
     * Set date_deleted
     *
     * @param \DateTime $dateDeleted
     * @return FamilyMonth
     */
    public function setDateDeleted($dateDeleted)
    {
        $this->date_deleted = $dateDeleted;

        return $this;
    }

    /**
     * Get date_deleted
     *
     * @return \DateTime 
     */
    public function getDateDeleted()
    {
        return $this->date_deleted;
    }

    /**
     * Set family
     *
     * @param \Budget\BudgetBundle\Entity\Family $family
     * @return FamilyMonth
     */
    public function setFamily(\Budget\BudgetBundle\Entity\Family $family = null)
    {
        $this->family = $family;

        return $this;
    }

    /**
     * Get family
     *
     * @return \Budget\BudgetBundle\Entity\Family 
     */
    public function getFamily()
    {
        return $this->family;
    }

    /**
     * Set amount_left
     *
     * @param string $amountLeft
     * @return FamilyMonth
     */
    public function setAmountLeft($amountLeft)
    {
        $this->amount_left = $amountLeft;

        return $this;
    }

    /**
     * Get amount_left
     *
     * @return string 
     */
    public function getAmountLeft()
    {
        return $this->amount_left;
    }
}
